home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
develop
/
ad2mac.arc
/
TEST05.LST
< prev
next >
Wrap
File List
|
1989-08-04
|
9KB
|
191 lines
Fri Aug 4 1989 10:15 Page 1
Test Program for AD2MAC - 07/25/89
2500 A.D. 6805 Macro Assembler - Version 4.03a
------------------------------------------------
Input Filename : test05.asm
Output Filename : test05.obj
1 ttl Test Program for AD2MAC - 07/25/89
2 * Test Program for AD2MAC Utility
3 * Extracts symbol info from 2500AD cross 6805 assembler
4 * listing file (.LST) and produces HDS-300 compatible
5 * macro file (.MAC) containing local symbol (LS) commands.
6 *
7 * BY: Peter S. Gilmour 25 July 1989
8
9 0103 control equ $103
10 0080 srmask equ $80
11 0204 fcbase equ $204
12 0040 stmask equ $40
13 00AA pattern equ $aa
14 0200 shram equ $200
15 0307 jmp1 equ $307
16 0323 jmp1_addr equ jmp1+$1c
17
18 0000 .absolute
19 0050 org $50
20 0050 count rmb 1 Command count
21 0051 .relative
22 0200 org shram
23 0200 rmb $20
24 0220 addr rmb 2 Command address
25 0222 get rmb 2 Get data address
26 0224 data rmb 80 Command data
27 page
Fri Aug 4 1989 10:15 Page 2
Test Program for AD2MAC - 07/25/89
28
29 0800 org $800
30
31 * Here for power up/reset:
32 0800 C6 01 03 start lda control
33 0803 A4 40 and #stmask If not power up, then
34 0805 27 18 beq config . enter exec via config cmd!
35
36 * Here for self-test:
37 0807 AE 00 stest ldx #0
38 0809 A6 AA lda #pattern
39 080B D7 02 00 st_100 sta shram,x Test 1st page of shared ram.
40 080E D1 02 00 cmp shram,x
41 0811 26 08 bne st_err1 Exit if error!
42 0813 43 coma Get inverse pattern
43 0814 2A F5 bpl st_100 and test same location again!
44 0816 5C inx
45 0817 27 F2 beq st_100 Continue until entire page is tested!
46
47 0819 20 0B bra exec Enter executive loop.
48
49 * Here for self-test error:
50 081B A6 02 st_err1 lda #shram/256
51 081D 20 FE bra * Hang the system.
52 page
Fri Aug 4 1989 10:15 Page 3
Test Program for AD2MAC - 07/25/89
53
54 * Here for config command:
55 081F C6 01 03 config lda control
56 0822 C7 02 00 sta shram
57 0825 9D nop
58 * Fall into the exec loop!
59
60 * Here for the executive command loop:
61 0826 9C exec rsp Reset stack pointer.
62 0827 C6 01 03 lda control
63 082A AA 80 ora #srmask
64 082C C7 01 03 sta control Yield shared ram to FIM.
65
66 082F C6 01 03 ex$wait lda control
67 0832 A4 80 and #srmask
68 0834 26 F9 bne ex$wait Wait for FIM to return shared ram.
69
70 0836 C6 02 04 lda fcbase Get cmd word and verify it, else
71 0839 26 EB bne exec . ignore it!
72 083B C6 02 05 lda fcbase+1
73 083E A1 02 cmp #maxfc+1
74 0840 24 E4 bhs exec
75
76 0842 48 lsla
77 0843 97 tax
78 0844 D6 08 55 lda ftabl,x Get addr of proper routine from table
79 0847 C7 03 23 sta jmp1_addr and place into JUMP address due to
80 084A D6 08 55 lda ftabl,x 6805 8-bit index register!
81 084D C7 03 24 sta jmp1_addr+1
82 0850 CD 03 07 jsr jmp1 Go execute the command.
83 0853 20 D1 bra exec Return to exec loop.
84
85 0855 0859 ftabl fdb rduser
86 0857 0866 fdb wruser
87 0001 maxfc equ ((*-ftabl)/2)-1 Maximum legal function code
88 page
Fri Aug 4 1989 10:15 Page 4
Test Program for AD2MAC - 07/25/89
89
90 * Here for read user memory command:
91 0859 CD 08 73 rduser jsr cmd.init
92
93 085C F6 rduser1 lda 0,x
94 085D C7 02 24 sta data
95 0860 5C inx
96 0861 3C 50 inc count
97 0863 26 F7 bne rduser1
98
99 0865 81 rts
100
101 * Here for write user memory command:
102 0866 CD 08 73 wruser jsr cmd.init
103
104 0869 C6 02 24 wruser1 lda data
105 086C F7 sta ,x
106 086D 5C inx
107 086E 3C 50 inc count
108 0870 26 F7 bne wruser1
109
110 0872 81 rts
111
112 * Subr. to init for command execution:
113 0873 C6 02 20 cmd.init lda addr
114 0876 C7 02 22 sta get
115 0879 C6 02 21 lda addr+1
116 087C C7 02 23 sta get+1
117 087F 81 rts
118
119 0880 end
Fri Aug 4 1989 10:15 Page 5
Defined Symbol Name Value References
24 addr 0220 113 115
113 cmd.init 0873 91 102
Pre CODE 0000
55 config 081F 34
9 control = 0103 32 55 62 64 66
20 count 0050 96 107
Pre DATA 0000
26 data 0224 94 104
66 ex$wait 082F 68
61 exec 0826 47 71 74 83
11 fcbase = 0204 70 72
85 ftabl 0855 78 80 87
25 get 0222 114 116
15 jmp1 = 0307 16 82
16 jmp1_addr = 0323 79 81
87 maxfc = 0001 73
Pre PAGE0 0000
13 pattern = 00AA 38
91 rduser 0859 85
93 rduser1 085C 97
14 shram = 0200 22 39 40 50 56
10 srmask = 0080 63 67
32 start 0800
37 stest 0807
12 stmask = 0040 33
39 st_100 080B 43 45
50 st_err1 081B 41
102 wruser 0866 86
104 wruser1 0869 108
Lines Assembled : 119 Assembly Errors : 0